package WeekThree;

import java.util.Scanner;

public class StrJude {
    public static void main(String[] args) {
        System.out.println("请随意输入二个字符");
        Scanner scanner = new Scanner(System.in);
        String str = scanner.next();
        String str1 = scanner.next();
        if (String(str,str1)){
            System.out.println("这两个字符是逆置的");
        }else{
            System.out.println("这两个字符不是逆置的");
        }
    }
    public static boolean String(String str,String str1) {
        if (str.length()!=str1.length()){
            return false;
        }
           int length=str.length();
            for (int i = 0; i < length; i++) {
                if (str.charAt(i)!=str1.charAt(length-1-i)){
                    return  false;
                }
            }
            return true;
    }

}